AM_CFLAGS=-Wall @xmlsec1_CFLAGS@ @libxml2_CFLAGS@ @glib_CFLAGS@ @ghttp_CFLAGS@ @openssl_CFLAGS@ @xmlsec1_openssl_CFLAGS@ -DDATADIR=\"@datadir@\" -DSYSCONFDIR=\"@sysconfdir@\" -DLOCALSTATEDIR=\"@localstatedir@/charon\"
AM_LDFLAGS=@xmlsec1_LIBS@ @libxml2_LIBS@ @glib_LIBS@ @ghttp_LIBS@ @openssl_LIBS@ -lresolv @xmlsec1_openssl_LIBS@

bin_PROGRAMS=charon topup validate-keyinfo generate-authority keyinfo paymentReturn

lib_LTLIBRARIES=libcharon.la

libcharon_la_SOURCES=certificate-chains.c config.c dns.c lib.c verify.c ipsec.c drawdown.c namespace.c compliance.c xmlutils.c

compliance_cgi_SOURCES=compliance-cgi.c
compliance_cgi_LDADD=libcharon.la -lecgi

verify_cgi_SOURCES=verify-cgi.c
verify_cgi_LDADD=libcharon.la -lecgi

compliance_cli_SOURCES=compliance-cli.c
compliance_cli_LDADD=libcharon.la

charon_SOURCES=switching-cgi.c
charon_LDADD=libcharon.la -lecgi

verify_cli_SOURCES=verify-cli.c
verify_cli_LDADD=libcharon.la

topup_SOURCES=topup.c
topup_LDADD=libcharon.la

noinst_PROGRAMS=compliance-cli verify-cli

validate_keyinfo_SOURCES=validate-keyinfo.c
validate_keyinfo_LDADD=libcharon.la

dd_LDADD=libcharon.la

generate_authority_SOURCES=generate-authority.c
generate_authority_LDADD=libcharon.la mcx/libmcx.la

generated_xsd=authority.xsd charon.xsd config.xsd settlement-ws.xsd settlement.xsd xenc-schema.xsd
local_xsd=signature-proposition.xml signature-drawdown.xml xmldsig-core-schema.xsd xmldsig-pkcs.xsd

data_DATA=$(generated_xsd) $(local_xsd)

sysconf_DATA=config.xml

keyinfo_SOURCES=keyinfo.c
keyinfo_LDADD=libcharon.la

paymentReturn_SOURCES=paymentReturn.c
paymentReturn_LDADD=libcharon.la -lecgi

EXTRA_DIST=authority.xsd.in charon.xsd.in config.xsd.in settlement-ws.xsd.in settlement.xsd.in xenc-schema.xsd.in $(local_xsd) $(sysconf_DATA)

noinst_HEADERS=common.h

if COND_OPENWRT
DIR_OPENWRT = openwrt
endif

if COND_WEBLOGIN
DIR_WEBLOGIN = web-login
endif

if COND_WEBADMIN
DIR_WEBADMIN = web-admin
endif

SUBDIRS=mcx . ipkg init.d $(DIR_OPENWRT) $(DIR_WEBLOGIN) $(DIR_WEBADMIN) prepaid tools

install-data-local:
	-mkdir -p $(DESTDIR)/$(PREFIX)/@localstatedir@/charon

$(generated_xsd): %: $(srcdir)/%.in
	sed -e "s,@schemadir@,$(datarootdir),g" $< > $@

weblogindir = $(pkgdatadir)/web-login

CLEANFILES=$(generated_xsd)